# -*- coding: utf-8 -*-
"""
Created on Wed Sep 27 13:20:09 2017

@author: Luther
"""

i = 100
bool = True
while i < 1000:
    if i % 37 == 0:
        a = i // 100
        b = (i // 10) % 10
        c = i % 10
        #print(i)
        #print(a,b,c)
        if (a * 10 + b + c * 100) % 37 != 0 or (
                a * 1 + b * 100 + c * 10) % 37 != 0:
            bool = False
            print(bool)
            break
        #else:
        #bool=True
    i = i + 1
if bool:
    print(bool)
